CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/pages/software/executables/[name].tsx
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { Layout } from "antd";
7
8
import { SoftwareEnvNames } from "@cocalc/util/consts/software-envs";
9
import ExecutablesTable from "components/landing/executables-table";
10
import Footer from "components/landing/footer";
11
import Head from "components/landing/head";
12
import Header from "components/landing/header";
13
import Image from "components/landing/image";
14
import { Paragraph, Title } from "components/misc";
15
import A from "components/misc/A";
16
import { Customize, CustomizeType } from "lib/customize";
17
import { withCustomizedAndSoftwareSpec } from "lib/landing/software-specs";
18
import { ComputeInventory } from "lib/landing/types";
19
import executablesScreenshot from "public/software/executables.png";
20
import { STYLE_PAGE, STYLE_PAGE_WIDE } from "..";
21
22
interface Props {
23
name: SoftwareEnvNames;
24
index?: true;
25
customize: CustomizeType;
26
executablesSpec: ComputeInventory["executables"];
27
timestamp: string;
28
}
29
30
export default function Executables(props: Props) {
31
const { name, customize, executablesSpec, timestamp } = props;
32
33
function renderInfo() {
34
return (
35
<div style={{ maxWidth: STYLE_PAGE.maxWidth, margin: "0 auto" }}>
36
<Title level={1} style={{ textAlign: "center" }}>
37
Executables in CoCalc (Ubuntu {name})
38
</Title>
39
<div
40
style={{
41
width: "50%",
42
float: "right",
43
paddingBottom: "15px",
44
paddingLeft: "15px",
45
}}
46
>
47
<Image
48
src={executablesScreenshot}
49
alt="Terminal showing listing executables in CoCalc"
50
/>
51
</div>
52
<Paragraph>
53
This is a non-comprehensive list of executables available on CoCalc.
54
</Paragraph>
55
<Paragraph>
56
To run anything listed below, you need to either{" "}
57
<A href="/features/terminal">open a "Terminal"</A> or run the command
58
indirectly via a{" "}
59
<A href="/features/jupyter-notebook">Jupyter notebook</A>.
60
</Paragraph>
61
<Paragraph>
62
On CoCalc, you can also install or compile your own executable
63
binaries. You have a lot of control about your own project, which is a
64
containerized environment based on x86_64 Ubuntu Linux {name}.{" "}
65
</Paragraph>
66
</div>
67
);
68
}
69
70
return (
71
<Customize value={customize}>
72
<Head title="Executables in CoCalc" />
73
<Layout>
74
<Header page="software" subPage="executables" softwareEnv={name} />
75
<Layout.Content style={{ backgroundColor: "white" }}>
76
<div style={STYLE_PAGE_WIDE}>
77
{renderInfo()}
78
<ExecutablesTable
79
executablesSpec={executablesSpec}
80
timestamp={timestamp}
81
/>
82
</div>
83
<Footer />
84
</Layout.Content>
85
</Layout>
86
</Customize>
87
);
88
}
89
90
export async function getServerSideProps(context) {
91
return await withCustomizedAndSoftwareSpec(context, "executables");
92
}
93
94